package com.mine.redis.util.controller;

import com.mine.redis.util.bean.ShopDO;
import com.mine.redis.util.service.ShopService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author weixiao
 * @date 2024/8/15 15:01
 */
@Slf4j
@RestController
@RequestMapping("/shop")
public class ShopController {

    @Autowired
    private ShopService shopService;

    @GetMapping("/getShop")
    public ShopDO getShop(@RequestParam("id") int id) {
        return shopService.getShopById(id);
    }
}
